#pragma once
#include <Rz/Object.h>
#include <Rz/Graphics/Render/Libraries/OpenGL/GLArrayBuffer.h>
#include "../../IVertexBuffer.h"

namespace Rz { namespace Graphics { namespace Render { namespace Libraries { namespace OpenGL {

class GLVertexBuffer :
	public IVertexBuffer,
	public GLArrayBuffer
{
	public:
		RZ_RTTI(Rz::Graphics::Render::Libraries::OpenGL, GLVertexBuffer);
		RZ_RTTI_IMPLEMENTS(IVertexBuffer, GLArrayBuffer);
		RZ_RTTI_END;

		GLVertexBuffer(IRenderDevice* renderDevice);
		virtual ~GLVertexBuffer();

		virtual void Bind() override;
		virtual void Unbind() override;
	
	private:
		static void VertexElementUsageToSize(VertexElementUsage usage, GLenum* type, GLint* size, bool* normalized);
};

} } } } }
